package com.liddhome.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.liddhome.dao.QuotationDao;
import com.liddhome.entity.Quotation;
import com.liddhome.service.QuotationService;

/**
 * 语录Service实现类
 * @author lidd
 *
 */
@Service("QuotationService")
public class QuotationServiceImpl implements QuotationService {
	
	@Resource
	private QuotationDao QuotationDao;

	/**
	 * 查找语录列表
	 */
	@Override
	public List<Quotation> list(Map<String, Object> map) {
		return QuotationDao.list(map);
	}

	/**
	 * 查语录总数，分页用
	 */
	@Override
	public Long getTotal(Map<String, Object> map) {
		return QuotationDao.getTotal();
	}

	/**
	 * 修改语录
	 */
	@Override
	public Integer update(Quotation Quotation) {
		return QuotationDao.update(Quotation);
	}

	/**
	 * 添加语录
	 */
	@Override
	public Integer add(Quotation Quotation) {
		return QuotationDao.add(Quotation);
	}

	/**
	 * 删除语录
	 */
	@Override
	public Integer delete(String id) {
		return QuotationDao.delete(id);
	}

	/**
	 * 根据id查找语录修改时用
	 */
	@Override
	public Quotation findById(String id) {
		return QuotationDao.findById(id);
	}

}
